import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.*;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

import java.util.stream.Stream;

public class Junit5Test {

    public static Stream<Arguments> Generator() {
        return Stream.of(Arguments.arguments("1,zhansan","2,lisi "));
    }

    //    @Test
//    @BeforeAll
//    static void test01() {
//        WebDriver webDriver = new ChromeDriver();
//        webDriver.get("https://www.baidu.com");
//    }
    @ParameterizedTest
    @ValueSource(ints = {1,2,3})
    void test02(Integer a){
        System.out.println(a);

    }
    @ParameterizedTest
    @CsvSource({"1,2,3"})
    void test03(String a,String b,String  c){
        System.out.println(a+","+b+","+c);
    }
    @ParameterizedTest
    @CsvFileSource(resources = "test04.csv")
    void test04(String a,String b,String  c){
        Assertions.assertEquals("1,2,3",a);
        System.out.println(a+","+b+","+c);
    }
    @ParameterizedTest
    @MethodSource("Generator")
    void test05(String n,String name){
        System.out.println(n+","+name);
    }
    
}
